package no.rodland.acc.interceptors;

import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.Interceptor;

public class LoginInterceptor implements Interceptor {

    private static final long serialVersionUID = 7916774158185623777L;

    @Override
    public void destroy() { }

    @Override
    public void init() { }

    @Override
    public String intercept(ActionInvocation invocation) throws Exception {
        String returnValue = invocation.invoke();
        invocation.getInvocationContext().getSession().put(SessionInterceptor.LOGGED_IN, true);
        return returnValue;
    }
}
